package com.zscat.mallplus.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zscat.mallplus.utils.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 后台用户表
 * </p>
 *
 * @author mallplus
 * @since 2019-04-14
 */
@Data
@TableName("sys_user")
public class SysUser extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String username;

    private String password;

    /**
     * 头像
     */
    private String icon;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 昵称
     */
    @TableField("nick_name")
    private String nickName;

    private Long qsgStoreId;

    private String note;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 最后登录时间
     */
    @TableField("login_time")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loginTime;

    /**
     * 帐号启用状态：0->禁用；1->启用
     */
    private Integer status;

    /**
     * 供应商
     */
    @TableField("supply_id")
    private Long supplyId;


    //角色
    @TableField(exist = false)
    private String roleIds;

    @TableField(exist = false)
    private String confimpassword;

    @TableField(exist = false)
    private String code;

    /**
     * 店铺id
     */
    @TableField("store_id")
    private Long storeId;

    /**
     * 余额
     */
    @TableField("remain_money")
    private BigDecimal remainMoney;

    @TableField("username_122")
    private String userName122;

    //122密码
    @TableField("password_122")
    private String password122;

    //过期时间
    @TableField("expire_time")
    private String expireTime;

    //剩余短信条数
    @TableField("remain_sms_count")
    private int remainSmsCount;

    @TableField("shengwang_url")
    private String shengwangUrl;
    //硬件ID
    @TableField("sczzid")
    private String sczzid;

    //发证机关
    @TableField("fzjg")
    private String fzjg;

}
